package exp3;

import java.util.Scanner;

public class Exp3_4 {
	public static void main(String[] args) {
		int rows;
		Scanner s = new Scanner(System.in);
		System.out.print("请输入行数:");
		rows=s.nextInt();

		for(int i=-rows/2;i<=rows/2;i++) {
			System.out.printf("%-"+(3*Math.abs(i)+1)+"s","");
			for(int j= Math.abs(i)-rows/2;j<=rows/2-Math.abs(i);j++) {
				System.out.printf("%-3d",rows/2+1-Math.abs(i)-Math.abs(j));
			}
			System.out.println();
		}
	}
}
